#ifndef __LCD_INIT_H
#define __LCD_INIT_H


#include "lcd.h"

#define USE_HORIZONTAL 3  


#if USE_HORIZONTAL==0||USE_HORIZONTAL==1
    #define LCD_W 240
    #define LCD_H 320

#else
    #define LCD_W 320
    #define LCD_H 240
#endif


void LCD_DC_Clr(void);
void LCD_DC_Set(void);

void LCD_CS_Clr(void);

void LCD_RES_Clr(void);
void LCD_RES_Set(void);


void delay_1us(uint32_t count);



void LCD_WR_DATA8(uint8_t dat);
void LCD_WR_DATA(uint16_t dat);
void LCD_WR_REG(uint8_t dat);
void LCD_Address_Set(uint16_t x1, uint16_t y1, uint16_t x2, uint16_t y2); 
void LCD_Init(void);
void LCD_DisplayOn(void);
void LCD_InitDir(void);


void LCD_Write_Bus(uint8_t data);//
void bs_lcd_dma_transmit(uint8_t *data, uint16_t size);
void Init_Spi(void);
void LCD_SetBrightness(uint8_t duty);

void Init_Spi2(void);

#endif




